

{% block content %}

<style>

	table {     
	  border: 1px solid #999;     
	  border-collapse: collapse;     
	  font-family: Georgia, Times, serif;     
	}     
	
	th {     
	  border: 1px solid #999;     
	  font-size: 70%;     
	  text-transform: uppercase;     
	}     
	
	td {     
	  border: 1px solid #999;     
	  height: 5em;     
	  width: 5em;     
	  padding: 5px;     
	  vertical-align: top;     
	}     
	
	caption {     
	  font-size: 300%;     
	  font-style: italic;     
	}     
	
	.day {     
	  text-align: right;     
	}     
	
	.notes {     
	  font-family: Arial, Helvetica, sans-serif;     
	  font-size: 80%;     
	  text-align: right;     
	  padding-left: 20px;     
	}     
	
	.weekend {     
	  background-color: #F3F3F3;     
	}
</style>



{% for entry in entries %}
    <br />
    <b>{{ entry }}</b>{{ entry.short|safe }}
{% endfor %}


<table>    
  <caption>Calendar of Gleaning Events<br>{{ mname }} {{ year }}</caption>     
  <col class="weekend" />     
  <col class="weekday" span="5" />     
  <col class="weekend" />     
  <thead>     
    <tr>     
      <th>Sun</th>     
      <th>Mon</th>     
      <th>Tue</th>     
      <th>Wed</th>     
      <th>Thu</th>     
      <th>Fri</th>     
      <th>Sat</th>     
    </tr>     
  </thead>     
  <tbody> 
  {% for week in month_days %}    
  <tr> 
  	{% for day, entries, current in week %}    
  		<!-- TD style: empty | day | current; onClick handler and highlight --> 
  		<td class= {% if day == 0 %}"empty"{% endif %}
            {% if day != 0 and not current %}"day"{% endif %}
            {% if day != 0 and current %}"current"{% endif %}
            {% if day != 0 %}
                onClick="parent.location='{% url cal.views.day year month day %}'"
                onMouseOver="this.bgColor='#eeeeee';"
                onMouseOut="this.bgColor='white';"
            {% endif %} >
		
            <!-- Day number and entry snippets -->
            {% if day != 0 %}
                <div class="day">{{ day }}</div><!--this prints the day number --> 
                <br> 
                {% for event in eventlst %}
                	{% if event.event_datetime.day == day %}
                		{{ event.farm.farm_name }}
                	{% endif %}
                {% endfor %}  
                {% for entry in entries %}
                    <br />
                    <b>{{ entry.name }}</b>{{ entry.short|safe }}
                {% endfor %}
                {% for entry in other_entries %}
                    <div class="event">
                      {{ entry.short|safe }}<br />
                      {{ entry.body }}<br />
                    </div>
                {% endfor %}
                 <br />
            {% endif %}
            </td>
        {% endfor %}
        </tr>
    {% endfor %}
    </table> 
  </tr>     
  </tbody>     
</table>


{% endblock %}
